package dsx.iot;

import dsx.inf.IAnswChecker;

public class _IotContext implements IAnswChecker {
	int type;
	String flag;
	String src;
	String auth;
	String inf;
	
	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getSrc() {
		return src;
	}

	public void setSrc(String src) {
		this.src = src;
	}

	public String getAuth() {
		return auth;
	}

	public void setAuth(String auth) {
		this.auth = auth;
	}

	public String getInf() {
		return inf;
	}

	public void setInf(String inf) {
		this.inf = inf;
	}
	
	@Override
	public boolean checkAnsw(Object answ) {
		try {
			_IotContext data = (_IotContext)answ;
			return (data.inf.equals(inf) && data.type == 1 && data.flag.equals(flag));
		} catch (Exception ex) {
		}
		return false;
	}
}
